/*
 * @Description: 
 * @Author: HKH
 * @Date: 2024-09-19 10:29:11
 * @LastEditors: HKH
 * @LastEditTime: 2024-09-19 11:28:47
 */
/*
 * @Description: 
 * @Author: HKH
 * @Date: 2024-09-19 10:29:11
 * @LastEditors: HKH
 * @LastEditTime: 2024-09-19 10:50:22
 */

//子类要重写父类的方法，父类的引用指向子类对象
//  Animal a= new Dog()
public class Point {
    // 坐标位置
    public int x;
    public int y;
  
    // 构造器
    public Point() {
    }
  
    public Point(int x, int y) {
      this.x = x;
      this.y = y;
    }
  
    // show
    public void show() {
      System.out.println("点的横坐标x:" + x + "纵坐标y:" + y);
    }
  }